package com.example.origin.logtrace.controller;

import cn.hutool.extra.spring.SpringUtil;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;

@Slf4j
@RestController
public class DemoController {


    @SneakyThrows
    @GetMapping("test")
    public String test() {
        log.info("sss");
        SpringUtil.getBean(this.getClass()).print();
        return "";
    }
    @Async
    public void print(){
        log.info("aaa");
    }
}
